<?php echo $header; ?>
<div id="content">
   <div class="breadcrumb">
    <?php echo $this->breadCrumbs(); ?>
  </div>
  <?php if (isset($error_warning)) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/mail.png" alt="" /><?php echo $_['heading_title'];?></h1>
      <div class="buttons">
      <a onclick="location = '<?php echo UA('sale/mail_template/insert'); ?>'" class="button"><span><?php echo $_['button_insert']; ?></span></a>
      </div>
    </div>
    <div class="content">
      <form action="" method="post" enctype="multipart/form-data" id="form">
        <table class="list">
          <thead>
            <tr height="30">
			  <td><?php echo $_['text_code'];?></td>
			  <td><?php echo $_['text_title']; ?></td>
			  <td width="100"><?php echo $_['text_action']; ?></td>
            </tr>
          </thead>
          <tbody>
            <?php if ($templates) { ?>
            <?php foreach ($templates as $template) { ?>
            <tr  height="30" onmouseover="this.className='on';" onmouseout="this.className='';">
			  <td><?php echo $template['code']; ?></td>
			  <td><?php echo $template['title']; ?></td>
			  <td>				
				[<a href="<?php echo UA('sale/mail_template/update'); ?>&mail_template_id=<?php echo $template['mail_template_id']?>"><?php echo $_['text_edit']; ?></a>]
			  </td>
            </tr>
            <?php } ?>
            <?php } else { ?>
            <tr>
              <td class="center" colspan="15"><?php echo $_['text_no_results']; ?></td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
      </form>
	  <div class="pagination"><?php echo $pagination; ?></div>
    </div>
  </div>
</div>
<?php echo $footer; ?>